package com.xuecheng.base.exception;

import lombok.Data;

/**
 *
 */
@Data
public class XueChengPlusException extends RuntimeException {
    private String errMessage;

    public XueChengPlusException(){}

    public XueChengPlusException(String message){
        super(message);
        this.errMessage = message;
    }

    public static void cast(String message){
        throw new RuntimeException(message);
    }
    public static void cast(CommonError error){
        throw new RuntimeException(error.getErrMessage());
    }
}
